+Thu Mar 4 21:45:43 2004 Matthias Clasen <maclas@gmx.de>
+
+ * gtk/gtkcombobox.c: In list mode, set the background color
+ of the cell view to the base color of the style, instead of
+ hardwiring white. (#136158)
+
Thu Mar 4 01:32:19 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkpathbar.c (gtk_path_bar_set_path): Modified patch from
+Thu Mar 4 21:45:43 2004 Matthias Clasen <maclas@gmx.de>
+
+ * gtk/gtkcombobox.c: In list mode, set the background color
+ of the cell view to the base color of the style, instead of
+ hardwiring white. (#136158)
+
Thu Mar 4 01:32:19 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkpathbar.c (gtk_path_bar_set_path): Modified patch from
+Thu Mar 4 21:45:43 2004 Matthias Clasen <maclas@gmx.de>
+
+ * gtk/gtkcombobox.c: In list mode, set the background color
+ of the cell view to the base color of the style, instead of
+ hardwiring white. (#136158)
+
Thu Mar 4 01:32:19 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkpathbar.c (gtk_path_bar_set_path): Modified patch from
+Thu Mar 4 21:45:43 2004 Matthias Clasen <maclas@gmx.de>
+
+ * gtk/gtkcombobox.c: In list mode, set the background color
+ of the cell view to the base color of the style, instead of
+ hardwiring white. (#136158)
+
Thu Mar 4 01:32:19 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkpathbar.c (gtk_path_bar_set_path): Modified patch from
+Thu Mar 4 21:45:43 2004 Matthias Clasen <maclas@gmx.de>
+
+ * gtk/gtkcombobox.c: In list mode, set the background color
+ of the cell view to the base color of the style, instead of
+ hardwiring white. (#136158)
+
Thu Mar 4 01:32:19 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkpathbar.c (gtk_path_bar_set_path): Modified patch from
GValue *value,
GParamSpec *spec);
+static void gtk_combo_box_state_changed (GtkWidget *widget,
+ GtkStateType previous);
static void gtk_combo_box_style_set (GtkWidget *widget,
GtkStyle *previous);
static void gtk_combo_box_button_toggled (GtkWidget *widget,
widget_class->scroll_event = gtk_combo_box_scroll_event;
widget_class->mnemonic_activate = gtk_combo_box_mnemonic_activate;
widget_class->style_set = gtk_combo_box_style_set;
+ widget_class->state_changed = gtk_combo_box_state_changed;
gtk_object_class = (GtkObjectClass *)klass;
gtk_object_class->destroy = gtk_combo_box_destroy;
}
}
+static void
+gtk_combo_box_state_changed (GtkWidget *widget,
+ GtkStateType previous)
+{
+ GtkComboBox *combo_box = GTK_COMBO_BOX (widget);
+
+ if (GTK_WIDGET_REALIZED (widget))
+ {
+ if (combo_box->priv->tree_view && combo_box->priv->cell_view)
+ gtk_cell_view_set_background_color (GTK_CELL_VIEW (combo_box->priv->cell_view),
+ &widget->style->base[GTK_WIDGET_STATE (widget)]);
+ }
+
+ gtk_widget_queue_draw (widget);
+}
+
static void
gtk_combo_box_style_set (GtkWidget *widget,
GtkStyle *previous)
GtkComboBox *combo_box = GTK_COMBO_BOX (widget);
gtk_widget_queue_resize (widget);
-
+
/* if wrap_width > 0, then we are in grid-mode and forced to use
* unix style
*/
if (!GTK_IS_MENU (combo_box->priv->popup_widget))
gtk_combo_box_menu_setup (combo_box, TRUE);
}
+
+ if (combo_box->priv->tree_view && combo_box->priv->cell_view)
+ gtk_cell_view_set_background_color (GTK_CELL_VIEW (combo_box->priv->cell_view),
+ &widget->style->base[GTK_WIDGET_STATE (widget)]);
+
}
static void
gtk_frame_set_shadow_type (GTK_FRAME (combo_box->priv->cell_view_frame),
GTK_SHADOW_IN);
- g_object_set (G_OBJECT (combo_box->priv->cell_view),
- "background", "white",
- "background_set", TRUE,
- NULL);
+ gtk_cell_view_set_background_color (GTK_CELL_VIEW (combo_box->priv->cell_view),
+ >K_WIDGET (combo_box)->style->base[GTK_WIDGET_STATE (combo_box)]);
gtk_widget_show (combo_box->priv->cell_view_frame);
}